﻿using System;

namespace DataAccess
{
    /// <summary>
    /// Uses it to sign property's column name in database.
    /// </summary>
    [AttributeUsage(AttributeTargets.Property, Inherited = true)]
    public class ColumnNameAttribute : Attribute
    {
        private string name;

        public ColumnNameAttribute(string name)
        {
            this.name = name;
        }

        public ColumnNameAttribute()
        {
        }

        /// <summary>
        /// Gets the column name in database.
        /// </summary>
        /// <returns>column name</returns>
        public string GetName()
        {
            return name;
        }
    }
}
